package com.dark.util;

import com.dark.base.FlowerFallingErrorCodeEnmu;
import com.dark.base.FlowerFallingException;

/**
 * ClassName: AssertUtil
 * Description:AssertUtil
 *
 * @author chengluchao
 * @date: 2022/9/17 7:58 PM
 * @since 1.0.9
 */
public abstract class AssertUtil {

    public static void assertTrue(boolean b, FlowerFallingErrorCodeEnmu errorCodeEnmu) {
        if (!b) {
            throw new FlowerFallingException(errorCodeEnmu);
        }
    }
    public static void assertNouNull(Object o, FlowerFallingErrorCodeEnmu errorCodeEnmu) {
        if (o == null) {
            throw new FlowerFallingException(errorCodeEnmu);
        }
    }
}
